/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	ParameterBinderShaderResource.h
*
*	Description -	.
*
*	Comments	-	This class may not be used.
*
*	Modification History:
*			Name			   Date					Description
*			MrCodeSushi	-	06/10/2012	-	Creation of this file
**************************************************************************************/
#ifndef _PSX_PARAMETER_BINDER_SAHDER_RESOURCE_H_
#define _PSX_PARAMETER_BINDER_SAHDER_RESOURCE_H_

#include "PulseSTD.h"
#include "GraphicsTypes.h"
#include "IParameterBinder.h"
#include "ShaderResource.h"

namespace Pulse
{
	// This may not be used.
	class ParameterBinderShaderResource : public IParameterBinder
	{
	public:

		ParameterBinderShaderResource( void );

		ParameterBinderShaderResource( IParameter *pParam );

		virtual ~ParameterBinderShaderResource( void );

		//virtual void SetAsShaderResource( ShaderResource *pData ) { SetData( pData ); }
		// TODO: Make one for Texture1D
		virtual void SetAsShaderResource( Texture2D *pTexture );
		//virtual void SetAsShaderResource( ShaderResource *pData );	// TODO: Make one for Texture3D
		virtual void SetAsShaderResource( StructuredBuffer *pBuffer );
		virtual void SetAsShaderResource( Buffer *pBuffer );	

		virtual void BindValue( void );

		virtual EParameter::Type GetType( void ) { return EParameter::SHADER_RESOURCE; }

	private:

		void SetData( const ShaderResource *pData );

	private:

		// We assume that the shader resources are textures. Thus all texture types 
		//	are derived from IResourcePoolItem.
		IResourcePoolItem *m_pResItem;

		const ShaderResource *m_pData;

	};
}

#endif /* _PSX_PARAMETER_BINDER_SAHDER_RESOURCE_H_ */